import axios from '../../http/http'
import * as api from '../../http/api'
const state = {
    tableAData:[],
    canZhuoData:[]
}
const actions = {
    getStuData({commit}){
        return axios({
            url:api.getData,
            method:'post'
        }).then(res=>{
            // console.log(res.data) 这个里面有3个东西  code data token
            // 目的是讲data储存在vuex里面
            commit('addData',res.data.data)
            return res.code
        })
    },
    get

}
const mutations = {
    addData(state,obj){
        state.tableAData = obj
    }
}

export default {
    state,
    actions,
    mutations,
}